<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/XGameAdmin_template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>XGame</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->

<!-- InstanceEndEditable -->
<link type="text/css" rel="stylesheet" href="CSS/adminCSS.css" />
</head>
<?php
include('admin_lock.php');
if($_SERVER["REQUEST_METHOD"] == "POST")
{
	if(!empty($_POST['viewID']))
	{
		$id=addslashes($_POST['viewID']);
		$q="Select * FROM history_game where history_ID = $id";
		$result=mysql_query($q);
	}
}

?>
<body>
<div id="container">

<div id="wrapper">

<div id="banner">
<ul class="topLink">
<li> Welcome, Admin </li>
<li> <a href="Logout.php"> Logout </a> </li>
</ul>

<img src="Assets/XGame.png" alt="XGame" />
</div>

<div id="menu">

<ul class="nav">
<li> <a href="AdminMember.php"> Member </a> </li>
<li> <a href="AdminNews.php"> News </a> </li>
<li> <a href="AdminGames.php"> Games </a> </li>
<li> <a href="AdminStock.php"> Stock </a> </li>
<li> <a href="AdminOrder.php"> Order </a> </li>
<li> <a href="AdminHistory.php"> History </a> </li>
</ul>

</div>

<div id="main">
<!-- InstanceBeginEditable name="Main" -->
<table border="0" class="table" width="750px">
<tr align="center">
<th class="tableHeader"> Order Product ID </th>
<th class="tableHeader"> Order ID</th>
<th class="tableHeader"> Product Name </th>
<th class="tableHeader"> Unit Price </th>
</tr>

<?php
while($data_fetch=mysql_fetch_array($result))
{
echo "<tr align='center'>";
echo "<td class='tableContent'>". $data_fetch['history_game_ID'] ."</td>";
echo "<td class='tableContent'>". $data_fetch['history_ID'] ."</td>";
$gid = $data_fetch['game_ID'];
$query = mysql_query("SELECT demo_name from demo WHERE demo_ID='$gid'");
$query = mysql_fetch_assoc($query);
echo "<td class='tableContent'>" . $query['demo_name'] . "</td>";
echo "<td class='tableContent'>". $data_fetch['game_price'] ."</td>";
echo "</tr>";
}
?>
</table>
<!-- InstanceEndEditable -->
</div>

<div id="footer">
<p align="center"> &copy; &nbsp; 2012 XGame </p>
</div>

</div>

</div>

</body>
<!-- InstanceEnd -->
</html>